package com.tjetc.service;

import com.tjetc.dao.ShoppingCartMapper;
import com.tjetc.entity.ShoppingCart;
import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

public interface ShoppingCartService {
    //加入购物车
    int add(ShoppingCart shoppingCart);
    //删除购物车
    int delete(Integer id);
    //查询购物车
    ShoppingCart select(Integer id);
    //修改购物车菜品数量
    int updateNumber(Integer id, Integer increment);
    //用户查询所有购物车信息
    List<ShoppingCart> selectAll(Integer userId, Integer merchantId);
    //清空购物车
    int deleteAll(Integer userId,Integer merchantId);
    //添加购物车信息
    int insertByShoppingCart(Integer userId, Integer dishId, Integer merchantId, Integer increment);

}
